from base import  Base
from  selenium.webdriver.common.by import By
from time import sleep


class XuXiPage(Base):
    qinggoutong=(By.ID,"cn.xuexi.android:id/home_bottom_tab_icon_group")
    sousk = (By.XPATH,"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout[2]/android.widget.FrameLayout[1]/androidx.viewpager.widget.ViewPager/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.ListView/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.SearchView[3]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout")
    shousk = (By.ID,"android:id/search_src_text")
    duanyan = 'new UiSelector().resourceId("cn.xuexi.android:id/tv_empty_hint")'


    def souskyw(self,ne):
        self.find_ele(self.qinggoutong).click()
        sleep(2)
        self.find_wait_ele(self.sousk).click()
        sleep(2)
        self.find_wait_ele(self.shousk).send_keys(ne)
        sleep(3)